# Maintainer: Jan de Groot <jgc@archlinux.org>

pkgname=gcab
pkgver=1.4
pkgrel=1
pkgdesc="A GObject library to create cabinet files"
url="https://wiki.gnome.org/msitools"
arch=(x86_64)
license=(LGPL)
depends=(glib2)
makedepends=(gobject-introspection vala zlib git gtk-doc meson)
_commit=e3f0c240eb1a1961f0ff61a83a2c7fafba95abb4  # tags/v1.4^0
source=("git+https://gitlab.gnome.org/GNOME/gcab.git#commit=$_commit")
sha256sums=('SKIP')

pkgver() {
  cd $pkgname
  git describe --tags | sed 's/^v//;s/-/+/g'
}

prepare() {
  cd $pkgname
}

build() {
  arch-meson $pkgname build
  ninja -C build
}

check() {
  meson test -C build --print-errorlogs
}

package() {
  DESTDIR="$pkgdir" meson install -C build
}
